package com.ciei.dpagm.controller;

import com.alibaba.fastjson.JSONObject;
import com.ciei.dpagm.common.controller.BaseController;
import com.ciei.dpagm.service.MainEngineeringService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author pp
 * @date 2023/06/06
 */
@RestController
@RequestMapping("mainEngineering")
public class MainEngineeringController extends BaseController {

    @Autowired
    private MainEngineeringService mainEngineeringService;

    @RequestMapping("addProject")
    @ResponseBody
    public JSONObject addProject(@RequestBody JSONObject data) {
        return mainEngineeringService.addProject(data);
    }

    @RequestMapping("updateProject")
    @ResponseBody
    public JSONObject updateProject(@RequestBody JSONObject data) {
        return mainEngineeringService.updateProject(data);
    }

    @RequestMapping("initProject")
    @ResponseBody
    public JSONObject initProject(@RequestBody JSONObject data) {
        return mainEngineeringService.initProject(data);
    }

    @RequestMapping("deleteProject")
    @ResponseBody
    public JSONObject deleteProject(@RequestBody JSONObject data) {
        return mainEngineeringService.deleteProject(data);
    }

    /**
     * @author liuqi
     * @date  2023/08/17
     */
    @RequestMapping("getChipSupportMatrix")
    @ResponseBody
    public JSONObject getChipSupportMatrix() {
        return mainEngineeringService.getChipSupportMatrix();
    }

}
